function output = gamma(p)

g = 9.8;
A = 1;
if (0 <= abs(p) <= A*sqrt(g)) 
	 output =  -2.5*sqrt(g/A); 
else
	output =  2.5*g*sqrt(A)/(-abs(p)); 
end